<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
/*
  | -------------------------------------------------------------------------
  | URI ROUTING
  | -------------------------------------------------------------------------
  | This file lets you re-map URI requests to specific controller functions.
  |
  | Typically there is a one-to-one relationship between a URL string
  | and its corresponding controller class/method. The segments in a
  | URL normally follow this pattern:
  |
  |	example.com/class/method/id/
  |
  | In some instances, however, you may want to remap this relationship
  | so that a different class/function is called than the one
  | corresponding to the URL.
  |
  | Please see the user guide for complete details:
  |
  |	http://codeigniter.com/user_guide/general/routing.html
  |
  | -------------------------------------------------------------------------
  | RESERVED ROUTES
  | -------------------------------------------------------------------------
  |
  | There area two reserved routes:
  |
  |	$route['default_controller'] = 'welcome';
  |
  | This route indicates which controller class should be loaded if the
  | URI contains no data. In the above example, the "welcome" class
  | would be loaded.
  |
  |	$route['404_override'] = 'errors/page_missing';
  |
  | This route will tell the Router what URI segments to use if those provided
  | in the URL cannot be matched to a valid route.
  |
 */
/* [HUNGLV] config routers */

// router for module user
$route['user'] = "mod_user";
$route['user/(:num)'] = "mod_user/index/$1";
$route['user/add'] = "mod_user/updateUser";
$route['user/edit'] = "mod_user/updateUser/$1";

// router for module conversion rates
$route['conversion/(:num)'] = "mod_conversion/index/$1";
$route['conversion'] = "mod_conversion";
$route['conversion/add'] = "mod_conversion/addConversion";
$route['conversion/edit'] = "mod_conversion/editConversion";

// router for module holiday
$route['holiday'] = "mod_holiday";
$route['holiday/(:num)'] = "mod_holiday";
$route['holiday/add'] = "mod_holiday/addHoliday";
$route['holiday/edit/(:num)'] = "mod_holiday/editHoliday/$1";

// router for module Leave types
//$route['leave-types'] = "mod_leaveTypes";
//$route['leave-types/(:num)'] = "mod_leaveTypes";
//$route['leave-types/add'] = "mod_leaveTypes/addLeaveTypes";
//$route['leave-types/edit/(:num)'] = "mod_leaveTypes/editLeaveTypes/$1";
// router for module Salary Parameter
$route['salary-parameter'] = "mod_salarypara";
$route['salary-parameter/(:num)'] = "mod_salarypara/index/$1";
$route['salary-parameter/insert'] = "mod_salarypara/insert";
$route['salary-parameter/add'] = "mod_salarypara/addSalaryParameter";
$route['salary-parameter/edit'] = "mod_salarypara/editSalaryParameter";

// router for module PIT Parameter
$route['pit-parameter'] = "mod_pitpara";
$route['pit-parameter/(:num)'] = "mod_pitpara/index/$1";
$route['pit-parameter/add'] = "mod_pitpara/addPitParameter";
$route['pit-parameter/edit'] = "mod_pitpara/addPitParameter";

$route['pit-rules'] = "mod_pitpara/mod_pitrules/index";
$route['pit-rules/(:num)'] = "mod_pitpara/mod_pitrules/index/$1";
$route['pit-rules/(:num)/(:num)'] = "mod_pitpara/mod_pitrules/index/$1/$2";
$route['pit-rules/add'] = "mod_pitpara/mod_pitrules/addPitRules";
$route['pit-rules/add'] = "mod_pitpara/mod_pitrules/addPitRules";
$route['pit-rules/edit'] = "mod_pitpara/mod_pitrules/addPitRules";

// router for module Working shift
$route['company'] = "mod_company";
$route['company/add'] = "mod_company/addCompany";
$route['company/(:num)'] = "mod_company/index/$1";

// router for module Working shift
//$route['shift-info'] = "mod_shiftinfo";
// router for module upload
$route['upload'] = "mod_upload";

// router for module Time card manipulation
$route['time-card-manipulation'] = "mod_tcmanipulation";
$route['time-card-manipulation/import'] = "mod_tcmanipulation/import";

// router for module Leave Registration
$route['leaveregistration/(:num)'] = "mod_leaveregistration/index/$1";
$route['leaveregistration'] = "mod_leaveregistration";
$route['leaveregistration/add'] = "mod_leaveregistration/addleaveregistration";
$route['leaveregistration/edit'] = "mod_leaveregistration/editleaveregistration/$1/$2";
$route['leaveregistration/listemployee'] = "mod_leaveregistration/searchEmployee";
$route['leaveregistration/listemployee/(:num)'] = "mod_leaveregistration/searchEmployee/$1";

// router for module Overtime
$route['overtime/(:num)'] = "mod_overtime/index/$1";
$route['overtime'] = "mod_overtime";
$route['overtime/add'] = "mod_overtime/addovertime";
$route['overtime/edit'] = "mod_overtime/editovertime";
$route['overtime/listemployee'] = "mod_overtime/searchEmployee";
$route['overtime/listemployee/(:num)'] = "mod_overtime/searchEmployee/$1";

// router for module Time card
$route['timecard'] = "mod_timecard/index";
$route['timecard/timeholiday'] = "mod_timecard/caculationHolidayWorking";
$route['timecard/timenormal'] = "mod_timecard/caculationNormalWorking";
$route['timecard/timeweekend'] = "mod_timecard/caculationWeekendWorking";
$route['timecard/restime'] = "mod_timecard/caculationRestime";
$route['timecard/change-arrivaltime1'] = "mod_timecard/reChangeInputArrivalTimeTime1";
$route['timecard/change-leavetime1'] = "mod_timecard/reChangeInputLeaveTime1";
$route['timecard/rechangetime2'] = "mod_timecard/reChangeInputTime2";
$route['timecard/changeworking'] = "mod_timecard/changeWorking";

/* Leave info */
$route['employee/leave-info'] = "mod_employee/mod_leaveinfo/index";
$route['employee/leave-info/(:num)'] = "mod_employee/mod_leaveinfo/index/$1";
$route['employee/leave-info/update'] = "mod_employee/mod_leaveinfo/updateLeaveInfo";
$route['employee/leave-info/update/(:num)'] = "mod_employee/mod_leaveinfo/updateLeaveInfo/$1";

/* Bonus info */
$route['employee/bonus'] = "mod_employee/mod_employeebonus/index";
$route['employee/bonus/(:num)'] = "mod_employee/mod_employeebonus/index/$1";
$route['employee/bonus/update'] = "mod_employee/mod_employeebonus/updateBonusInfo";
$route['employee/(:num)/bonus/update/(:num)'] = "mod_employee/mod_employeebonus/updateBonusInfo/$1/$2";

// router redirect language
$route['jp'] = "mod_home/jp";
$route['en'] = "mod_home/en";

$route['reset-pass'] = "mod_home/resetpass";
$route['change-pass'] = "mod_home/changepass";

/* [HUNLV] confi router */


$route['default_controller'] = "mod_home";
$route['login'] = "mod_home/login";
$route['logout'] = "mod_home/logout";
$route['404_override'] = '';

// router for module payroll
$route['employeesalary'] = "mod_payroll";
$route['employeesalary/(:num)'] = "mod_payroll/index/$1";
$route['employeesalary/export/(:num)/(:num)/(:num)'] = "mod_payroll/exportEmployeeID/$1/$2/$3";
$route['employeesalary/exports'] = "mod_payroll/exportEmployee";
$route['employeesalary/exports/(:any)'] = "mod_payroll/exportEmployee";
$route['test'] = "mod_payroll/test";


//payroll/index


/* Begin Quyet */
/* List Time Card */
$route['listtimecard'] = "mod_listtimecard";
$route['listtimecard/(:num)'] = "mod_listtimecard/index/$1";

/* List Employee */
$route['employee'] = "mod_employee";
$route['employee/(:num)'] = "mod_employee/index/$1";
$route['employee/update'] = "mod_employee/updateEmployee";

/* salary info */
$route['employee/salary-info'] = "mod_employee/mod_salaryinfo/index/";
$route['employee/salary-info/(:num)'] = "mod_employee/mod_salaryinfo/index/$1";
$route['employee/salary-info/update'] = "mod_employee/mod_salaryinfo/updateSalaryInfo";

/* pit info */
$route['employee/pit-info'] = "mod_employee/mod_pitinfo/index";
$route['employee/pit-info/(:num)'] = "mod_employee/mod_pitinfo/index/$1";
$route['employee/pit-info/update'] = "mod_employee/mod_pitinfo/updatePITInfo";

/* List Position */
$route['position'] = "mod_position";
$route['position/(:num)'] = "mod_position/index/$1";
$route['position/update'] = "mod_position/updatePosition";

/* List Holiday */
$route['holiday'] = "mod_holiday";
$route['holiday/(:num)'] = "mod_holiday/index/$1";
$route['holiday/update'] = "mod_holiday/updateHoliday";

/* List leave type */
$route['leave-types'] = "mod_leavetypes";
$route['leave-types/(:num)'] = "mod_leavetypes/index/$1";
$route['leave-types/update'] = "mod_leavetypes/updateLeaveType";

/* Error page */
$route['error-page'] = "mod_error/index";

/* Shift Infomation */
$route['shift-info'] = "mod_shiftinfo";
$route['shift-info/(:num)'] = "mod_shiftinfo/index/$1";
$route['shift-info/update'] = "mod_shiftinfo/updateShipInfo";
/*End Quyet*/

/* End of file routes.php */
/* Location: ./application/config/routes.php */